package com.yanqu.road.dao.dbV2;


import com.yanqu.road.dao.dbV2.serializer.DLong;
import com.yanqu.road.entity.DataObject;



public class BaseEntity extends DataObject {

    public BaseEntity() {

    }


    @IField(fieldName = "create_time", serializer = DLong.class)
    public long createTime = System.currentTimeMillis();

    @IField(fieldName = "update_time", serializer = DLong.class)
    public long updateTime = 0;


    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }


    public void refreshUpdateTime() {
        this.updateTime = System.currentTimeMillis();
        this.setUpdateOption();
    }

}
